package com.one.consumer.reserve.model;

import com.one.common.model.bean.BannerBean;
import com.one.common.model.http.base.BaseResponse;
import com.one.consumer.reserve.model.bean.DEStyleBean;
import com.one.consumer.reserve.model.bean.ReserveIconBean;
import com.one.consumer.reserve.model.bean.TimeBean;
import com.one.consumer.reserve.model.item.AreaItem;
import com.one.consumer.reserve.model.item.CaseItem;
import com.one.consumer.reserve.model.item.CustomItem;
import com.one.consumer.reserve.model.item.CustomProjectItem;
import com.one.consumer.reserve.model.item.ProgramImageItem;
import com.one.consumer.reserve.model.item.ProgramItem;
import com.one.consumer.reserve.model.item.ProjectTypeItem;
import com.one.consumer.reserve.model.item.ReserveItem;

import java.util.ArrayList;
import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * author ：zhulunjun
 * email  ：zhulunjun@qq.com
 * date   ：2018/10/21 下午9:05
 * description ：
 **/
public interface ReserveApi {

    /**
     * 装修案例列表
     */
    @FormUrlEncoded
    @POST("/renovationInterfaces/v1.0/getCaseEffects")
    Observable<BaseResponse<ArrayList<CaseItem>>> getCaseList(@Field("page") String page);

    /**
     * 装修案例详情
     */
    @FormUrlEncoded
    @POST("/renovationInterfaces/v1.0/getCaseEffectDetail")
    Observable<BaseResponse<CaseItem>> getCaseDetail(@Field("effect_id") String id);

    /**
     * 定制加配----项目户型方案效果图
     */
    @FormUrlEncoded
    @POST("/customizedInterfaces/v1.0/getProgrammeImgs")
    Observable<BaseResponse<ArrayList<ProgramImageItem>>> getProgramImags(@Field("programme_id") String id);

    /**
     * 首页banner
     */
    @FormUrlEncoded
    @POST("/yinlongBannerInterfaces/v1.0/getYinlongBanners")
    Observable<BaseResponse<ArrayList<BannerBean>>> getBanner(@Field("banner_range") String range);

    /**
     * 装修风格
     */
    @FormUrlEncoded
    @POST("/renovationInterfaces/v1.0/getRenovationStyles")
    Observable<BaseResponse<ArrayList<DEStyleBean>>> getStyles(@FieldMap Map<String, String> params);

    /**
     * 预约，装修或者设计
     */
    @FormUrlEncoded
    @POST("/renovationInterfaces/v1.0/insertRenovationOrder")
    Observable<BaseResponse<Object>> reserve(@FieldMap Map<String, String> params);



    /**
     * 定制加配---项目列表
     */
    @FormUrlEncoded
    @POST("/customizedInterfaces/v1.0/getCustomizeds")
    Observable<BaseResponse<ArrayList<CustomProjectItem>>> getCutomProjectList(@Field("page") String page);

    /**
     * 定制加配----项目户型列表
     */
    @FormUrlEncoded
    @POST("/customizedInterfaces/v1.0/getCustomizedHuxings")
    Observable<BaseResponse<ArrayList<ProjectTypeItem>>> getProjectTypeList(@Field("customized_id") String id);

    /**
     * 定制加配----项目户型方案列表
     */
    @FormUrlEncoded
    @POST("/customizedInterfaces/v1.0/getCustomizedHuxingProgrammes")
    Observable<BaseResponse<ArrayList<ProgramItem>>> getProjectProgramList(@Field("huxing_id") String id);

    /**
     * 定制加配----下单
     */
    @FormUrlEncoded
    @POST("/customizedInterfaces/v1.0/insertCustomizedOrder")
    Observable<BaseResponse<Object>> customOrder(@FieldMap Map<String, String> params);

    /**
     * 预约订单列表
     */
    @FormUrlEncoded
    @POST("/renovationInterfaces/v1.0/getRenovationOrders")
    Observable<BaseResponse<ArrayList<ReserveItem>>> reserveList(@FieldMap Map<String, String> params);

    /**
     * 预约订单详情
     */
    @FormUrlEncoded
    @POST("/renovationInterfaces/v1.0/getRenovationOrderDetail")
    Observable<BaseResponse<ReserveItem>> reserveDetail(@FieldMap Map<String, String> params);

    /**
     * 定制加配----订单列表
     */
    @FormUrlEncoded
    @POST("/customizedInterfaces/v1.0/getCustomizedOrders")
    Observable<BaseResponse<ArrayList<CustomItem>>> customList(@FieldMap Map<String, String> params);

    /**
     * 定制加配----订单详情
     */
    @FormUrlEncoded
    @POST("/customizedInterfaces/v1.0/getCustomizedOrderDetail")
    Observable<BaseResponse<CustomItem>> customDetail(@FieldMap Map<String, String> params);



    /**
     * 报修----服务时间列表
     */
    @FormUrlEncoded
    @POST("/maintailInterfaces/v1.0/getMaintailServiceTimes")
    Observable<BaseResponse<ArrayList<TimeBean>>> getTimeList(@Field("parent_id") String id);

    /**
     * 报修----维修区域
     */
    @FormUrlEncoded
    @POST("/maintailInterfaces/v1.0/getMaintailPartss")
    Observable<BaseResponse<ArrayList<AreaItem>>> getAreaList(@Field("parent_id") String id);



    /**
     * 报修订单-----下单
     */
    @FormUrlEncoded
    @POST("/maintailInterfaces/v1.0/insertMaintailOrder")
    Observable<BaseResponse<Object>> order(@FieldMap Map<String, String> params);


    /**
     * 获取装修预约的图标
     */
    @FormUrlEncoded
    @POST("/maintailInterfaces/v1.0/getMaintailIconDetail")
    Observable<BaseResponse<ReserveIconBean>> getImg(@FieldMap Map<String, String> params);

    /**
     * 删除订单 -装修
     */
    @FormUrlEncoded
    @POST("/renovationInterfaces/v1.0/deleteRenovationOrder")
    Observable<BaseResponse<Object>> deleteDe(@FieldMap Map<String, String> params);

    /**
     * 取消订单 -装修
     */
    @FormUrlEncoded
    @POST("/renovationInterfaces/v1.0/cancelRenovationOrder")
    Observable<BaseResponse<Object>> cancelDe(@FieldMap Map<String, String> params);

    /**
     * 删除订单 -定制
     */
    @FormUrlEncoded
    @POST("/customizedInterfaces/v1.0/deleteCustionizedOrder")
    Observable<BaseResponse<Object>> deleteCu(@FieldMap Map<String, String> params);

    /**
     * 取消订单 -定制
     */
    @FormUrlEncoded
    @POST("/customizedInterfaces/v1.0/cancelCustionizedOrder")
    Observable<BaseResponse<Object>> cancelCu(@FieldMap Map<String, String> params);
}
